package umbook.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.roo.addon.web.mvc.controller.scaffold.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import umbook.domain.Muro;

@RequestMapping("/muroes")
@Controller
@RooWebScaffold(path = "muroes", formBackingObject = Muro.class)
public class MuroController {

    @RequestMapping(method = RequestMethod.POST, value = "{id}")
    public void post(@PathVariable Long id, ModelMap modelMap, HttpServletRequest request, HttpServletResponse response) {
    }

    @RequestMapping
    public String index() {
        return "muroes/home";
    }

    @RequestMapping(value = "/home", produces = "text/html")
    @ResponseBody
    public String home(Model uiModel, HttpServletRequest request, HttpServletResponse response) {
        return "muroes/home";
    }
}
